﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdateLinkman.aspx.cs" Inherits="admin_UpdateLinkman" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
                  <link rel="Stylesheet" type="text/css" href="../Styles/right_style.css" />
                <script type="text/javascript" src="../Scripts/jquery.ui/js/jquery.js"></script>

                <style type="text/css">
                <!--
                html{ scrollbar-base-color: #dbecf8; scrollbar-arrow-color: #2a8ed1; scrollbar-track-color: #bdddf2; scrollbar-3dlight-color: #2886c5; scrollbar-darkshadow-color: #2886c5;
                scrollbar-face-color: #dbecf8; scrollbar-shadow-color: #dbecf8;  }
                -->
                </style>

</head>
<body>
    <form id="form1" runat="server">
            <div class="sub_right_top">
  <div class="hdm_header" >
    <div class="tb1_on"><h2 class="h2_icon">联系人信息</h2></div>

    <div class="clear"></div>
  </div>
  <div class="hdm_footer">
    <div class="fabu_gg_title">联系人信息编辑</div>            
    <form id="form2" name="form1" method="post" action="">  
    <table width="97%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#77acd0" style="border-collapse:collapse; ">
      <tr>
        <td width="120">客户单位：</td>
        <td>

          <div class="disk_liulan_one"><asp:TextBox ID="txtClient" runat="server" Enabled="False" Width="80%"></asp:TextBox></div>
          <div class="disk_liulan_tow">
            <asp:Button ID="Button1" runat="server" Text="" CssClass="contact_xuanze" OnClientClick="val = window.showModalDialog ('SelectClient.aspx', '','status:no;center:yes;scroll:yes;resizable:no;help:no;dialogWidth:300px;dialogHeight:300px');document.getElementById('txtClient').value = val[1];document.getElementById('hidClientId').value = val[0];return false;" />  
          </div>          </td>
      </tr>
      <tr>
        <td width="120">姓名：</td>
        <td>
          <asp:TextBox ID="txtLinkmanName" runat="server" Width="80%"></asp:TextBox>    </td>

      </tr>
      <tr>
        <td>性别：</td>
        <td>
          <asp:DropDownList ID="ddlSex" runat="server" Font-Size="12px" Height="20px" 
                Width="124px">
                                    <asp:ListItem Value="1">男</asp:ListItem>
                                    <asp:ListItem Value="0">女</asp:ListItem>
                                </asp:DropDownList>
        </td>
      </tr>
      <tr>
        <td width="120">职位：</td>
        <td>
          <asp:TextBox ID="txtJob" runat="server" Width="80%"></asp:TextBox>  </td>
      </tr>

      <tr>
        <td width="120">爱好：</td>
        <td>
         <asp:TextBox ID="txtLike" runat="server" Width="80%"></asp:TextBox> </td>
      </tr>
      <tr>
        <td>家庭住址：</td>

        <td>
          <asp:TextBox ID="txtFamilyAddress" runat="server" Width="80%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>家庭邮编：</td>
        <td>
         <asp:TextBox ID="txtFamilyPostalcode" runat="server" Width="80%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td width="120">工作电话：</td>
        <td>
          <asp:TextBox ID="txtJobTelephone" runat="server" Width="80%"></asp:TextBox>   </td>
      </tr>
      <tr>

        <td width="120">家庭电话：</td>
        <td>
          <asp:TextBox ID="txtHomeTelephone" runat="server" Width="80%"></asp:TextBox> </td>
      </tr>
      <tr>
        <td width="120">手机：</td>
        <td>
        <asp:TextBox ID="txtHandsetNumber" runat="server" Width="80%"></asp:TextBox>     </td>
      </tr>
      <tr>
        <td width="120">电子邮箱：</td>
        <td>
         <asp:TextBox ID="txtEmail" runat="server" Width="80%"></asp:TextBox>   </td>
      </tr>

      <tr>
        <td>QQ号码：</td>
        <td>
          <asp:TextBox ID="txtQQNumber" runat="server" Width="80%"></asp:TextBox>
        </td>
      </tr>
      <tr>
        <td>备注：</td>

        <td>
         <asp:TextBox ID="txtRemark" runat="server" Height="60px" TextMode="MultiLine" Width="80%"></asp:TextBox>
        </td>
      </tr>
      
      
      <tr>
        <td colspan="2" align="center"><div class="disk_queding_top">
        <asp:Button ID="Button3" runat="server" OnClick="Button2_Click" Text="" CssClass="queding_anniu"  OnClientClick="return chkfrm()" />
        </div>
          <div class="disk_back_top">
            <asp:Button ID="btnBack" runat="server" Text="" CssClass="fanhui_anniu" CausesValidation="False" OnClick="btnBack_Click" />
          </div></td>
        </tr>

    </table>
    <div style="height:20px;"></div>
    </form>
  </div>
</div>

        <asp:HiddenField ID="hidClientId" runat="server" />
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
    function chkfrm()
    {
        if(document.getElementById('txtClient').value=='')
        {
            alert('客户单位不能为空！');
            return false;
        }
        if(document.getElementById('txtLinkmanName').value =='')
        {
            alert('姓名不能为空！');
            return false;
        }
        if(document.getElementById('txtLinkmanName').value.length>20)
        {
            alert('姓名最大长度不能超过20个字符！');
            return false;
        }
        if(document.getElementById('txtJob').value.length>50)
        {
            alert('职位最大长度不能超过50个字符！');
            return false;
        }
        if(document.getElementById('txtLike').value.length>50)
        {
            alert('爱好最大长度不能超过50个字符！');
            return false;
        }
        if(document.getElementById('txtFamilyAddress').value.length>200)
        {
            alert('家庭住址最大长度不能超过200个字符！');
            return false;
        }
        if(document.getElementById('txtFamilyPostalcode').value != '')
        {
            var checkfp=/\d{6}/;
            if(!checkfp.test(document.getElementById('txtFamilyPostalcode').value))
            {
                alert('家庭邮编格式不正确！');
                return false;
            }
        }
        if(document.getElementById('txtJobTelephone').value.length>20)
        {
            alert('工作电话最大长度不能超过20个字符！');
            return false;
        }
        if(document.getElementById('txtHomeTelephone').value.length>20)
        {
            alert('家庭电话最大长度不能超过20个字符！');
            return false;
        }
        if(document.getElementById('txtHandsetNumber').value.length>20)
        {
            alert('手机最大长度不能超过20个字符！');
            return false;
        }
        if(document.getElementById('txtEmail').value != '')
        {
            var checkEmail=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
            if(!checkEmail.test(document.getElementById('txtEmail').value))
            {
                alert('Email格式不正确！');
                return false;
            }
        }
        if(document.getElementById('txtQQNumber').value.length>20)
        {
            alert('QQ号码最大长度不能超过20个字符！');
            return false;
        }
        return true;
    }

</script>
